<?php

$con=mysqli_connect("localhost","root","admin","HOPEWw");
// Check connection
if (mysqli_connect_errno())
  {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }

$result = mysqli_query($con,"SELECT * FROM ECD");

echo "<table border='1'>
<tr>
<th>ECD Code</th>
<th>ECD Name</th>
<th>ECD Location</th>
<th>ECD Manager</th>
<th>Manager Contact</th>

</tr>";

while($row = mysqli_fetch_array($result))
  {
  echo "<tr>";
  echo "<td>" . $row['ECD_code'] . "</td>";
  echo "<td>" . $row['ECD_name'] . "</td>";
   echo "<td>" . $row['ECD_Location'] . "</td>";
  echo "<td>" . $row['ECD_manager_name'] . "</td>";
  echo "<td>" . $row['ECD_Contact'] . "</td>";
  
  echo "</tr>";
  }
echo "</table>";

mysqli_close($con);
?>
